package com.moneywelcome.loanservicefacade.api;

import com.moneywelcome.results.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

@Api(tags = "认证服务")
@FeignClient(value = "credit-loan-service", contextId = "AuthService")
public interface AuthServiceApi {

    @ApiOperation("身份证上传认证")
    @PostMapping("idCard")
    @ApiImplicitParam(name = "idCard", value = "身份证照片：1人像面、2国徽面", required = true)
    Result idCardAuth(@RequestParam("idCard") MultipartFile[] idCard) throws IOException;

    @ApiOperation("人脸识别")
    @PostMapping("face")
    @ApiImplicitParam(name = "face",value = "人脸图片",required = true)
    Result faceAuth(@RequestParam("face") MultipartFile face) throws IOException;

}
